-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add original Request to the Response type. #464
Conversation
I think I'm on board with this one, and I like the naming. It strongly implies that this is the request before any redirects are followed. Some considerations:
|
Thank you for the positive response. I just updated this pull request accordingly, however I'm still not sure if it meets the expectations. In particular I was not sure where to place the |
It actually looks perfect to me. Only final request I'd make is to add a comment on |
Glad to hear that. I updated the comment on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you!
Deliver it instead by way of the Manager's response modifier. See snoyberg#464 This patch accomplishes the same thing as that one in essentially the same way, but improves upon it by not requiring a request to exist in order to construct a response. This can be useful in e.g. testing / mocking definitions in which we want to express a base fixed response. In other wrods, it is "less breaky" and easier to adopt.
I know this is already released so it's maybe a fool's errand, but I want to propose this alternative implementation which doesn't require having a |
Deliver it instead by way of the Manager's response modifier. See snoyberg#464 This patch accomplishes the same thing as that one in essentially the same way, but improves upon it by not requiring a request to exist in order to construct a response. This can be useful in e.g. testing / mocking definitions in which we want to express a base fixed response. In other wrods, it is "less breaky" and easier to adopt.
Deliver it instead by way of the Manager's response modifier. See snoyberg#464 This patch accomplishes the same thing as that one in essentially the same way, but improves upon it by not requiring a request to exist in order to construct a response. This can be useful in e.g. testing / mocking definitions in which we want to express a base fixed response. In other wrods, it is "less breaky" and easier to adopt.
Another proposal to get the original Request within
managerModifyResponse
.Example usage: